package in.muton.edushare.poll.pages;

import in.muton.edushare.poll.panels.IPollPanelContainer;
import in.muton.edushare.poll.panels.NewPoll;

import org.apache.wicket.PageParameters;
import org.apache.wicket.model.IModel;

import com.edushare.common.vo.Poll;

public class NewPollPage extends PollBase implements IPollPanelContainer{
	public NewPollPage(PageParameters params) {
		super(params);
		add(new NewPoll("newPollPanel", getPollModel(), this, this, 0, 0));
	}

	@Override
	protected String getPageName() {
		return "PollEdit";
	}

	public void gotoNextPage() {
		PageParameters params = new PageParameters();
		params.add("0", Integer.toString(getPollModel().getObject()
				.getPollId()));
		setResponsePage(PollEdit.class, params);
	}

	public void setPoll(IModel<Poll> pollModel) {
		setPollModel(pollModel);
	}

	public void gotoDeletedPage() {
	}
}
